---
import './TabGroup.css';
import { getLanguageFromURL } from '~/util/path-utils';

const currentPage = new URL(Astro.request.url).pathname;
const lang = getLanguageFromURL(currentPage);
const segments = currentPage.split('/');
---

<div class="TabGroup no-flex">
	<a href={`/${lang}/install/auto/`} class={segments.includes('auto') ? 'active' : ''}>
		{Astro.locals.t('install.autoTab')}
	</a>
	<a href={`/${lang}/install/manual/`} class={segments.includes('manual') ? 'active' : ''}>
		{Astro.locals.t('install.manualTab')}
	</a>
</div>
